openapi: 3.0.1
info:
  title: Task Statuses API
  description: >-
    Provides access to the task status values that are part of a Hyperproof
    organization.
  version: '1.0'
servers:
  - url: https://api.hyperproof.app/v1/taskstatuses
    description: Hyperproof US
  - url: https://api.hyperproofgov.app/v1/taskstatuses
    description: Hyperproof Gov
  - url: https://api.hyperproof.eu/v1/taskstatuses
    description: Hyperproof EU
security:
  - oauth2: []
paths:
  /:
    get:
      summary: Get Task Statuses
      description: >
        `GET /`


        #### Description


        Retrieves all task statuses defined within an organization, including
        their names, descriptions, and usage details.
      operationId: get-task-statuses
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskStatusCollection'
              example:
                - id: ba50096d-bbfa-47af-94a7-092b0984cf35
                  orgId: 4c05da3f-f076-461c-8105-80a07a42ab7f
                  name: Closed
                  type: closed
                  sortOrder: 4
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://accounts.hyperproof.app/oauth/token
          scopes:
            organization.read: Grants read access to the task statuses
  schemas:
    TaskStatus:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier for the task status.
        orgId:
          type: string
          format: uuid
          description: The unique identifier for the organization.
        name:
          type: string
          description: The user-facing label of the task status.
        type:
          type: string
          description: The type of the task status.
          enum:
            - notStarted
            - inProgress
            - submitted
            - closed
            - cancelled
        sortOrder:
          type: integer
          description: The order in which the task status appears in lists.
      example:
        id: ba50096d-bbfa-47af-94a7-092b0984cf35
        orgId: 4c05da3f-f076-461c-8105-80a07a42ab7f
        name: Closed
        type: closed
        sortOrder: 4
    TaskStatusCollection:
      type: array
      description: A collection of task statuses.
      items:
        $ref: '#/components/schemas/TaskStatus'
